package com.ruoyi.drug.mapper;


import com.ruoyi.drug.domain.DrugPhysic;
import com.ruoyi.drug.domain.DrugPhysics;
import com.ruoyi.drug.domain.DrugRecipt;
import com.ruoyi.drug.domain.DrugReciptPhysics;

import java.util.List;

public interface DrugReciptMapper {
    /**
     * 查询厂家药品列表
     *
     * @param drugPhysics
     * @return
     */
    List<DrugPhysics> selectPhysicsList(DrugPhysics drugPhysics);

    /**
     * 添加药品到单据中
     * @param id
     * @param reciptNum
     * @return
     */
    int addReciptPhysic(Long id,String reciptNum);

    /**
     * 查询药品
     * @return
     */
    List<DrugReciptPhysics> selectReciptPhysics(String reciptNum);

    /**
     * 暂存单据
     *
     * @param drugRecipt
     * @return
     */
    int addRecipt(DrugRecipt drugRecipt);

    /**
     * 提交审核
     *
     * @param drugRecipt
     * @return
     */
    int addRecipt2(DrugRecipt drugRecipt);

    /**
     * 未完成单据提交审核
     *
     * @param drugRecipt
     * @return
     */
    int updateRecipt(DrugRecipt drugRecipt);
    /**
     * 暂存单据
     *
     * @param drugRecipt
     * @return
     */
    int updateRecipt1(DrugRecipt drugRecipt);
    /**
     * 查询单据
     *
     * @param drugRecipt
     * @return
     */
    List<DrugRecipt> selectRecipt(DrugRecipt drugRecipt);

    /**
     * 更新药品信息
     *
     * @param id
     * @param rpCount
     * @param rpPrice
     * @param rpNum
     * @param remark
     * @param total
     * @return
     */
    int updateSetting(Long id,int rpCount,Double rpPrice ,String rpNum,String remark,Double total);

    /**
     * 药品删除
     *
     * @param pId
     * @return
     */
    int deletePhysic(Long pId);

    /**
     * 单据作废
     * @param id
     * @return
     */
    int deleteRecipt(Long id);

    /**
     * 单据批量审核
     * @param id
     * @return
     */
    int processRecipt(Long id);

    /**
     * 药品入库
     * @param id
     * @return
     */
    int reciptPutIn(Long id,String username);

    int physicPutIn(String physicCode,int count);

    String selectReciptNumByrId(Long rid);

    DrugRecipt selectReciptByRNum(String rNum);
}
